// Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
// This source file is part of the Cangjie project, licensed under Apache-2.0
// with Runtime Library Exception.
//
// See https://cangjie-lang.cn/pages/LICENSE for license information.

#ifndef CANGJIE_MIGRATOR_ACTIONS_REPLACE
#define CANGJIE_MIGRATOR_ACTIONS_REPLACE

#include <string>

#include "PositionRange.h"

namespace CangjieMigrator::Rules {

class Rule; // Only for save a pointer

} // namespace CangjieMigrator::Rules

namespace CangjieMigrator::Actions {

struct Replace {
    PositionRange range;
    std::string update;
    const Rules::Rule *rule;

    Replace(PositionRange range, std::string update, const Rules::Rule *rule);
    std::string ToString() const;
};

} // namespace CangjieMigrator::Actions

#endif // CANGJIE_MIGRATOR_ACTIONS_REPLACE
